import {getBannerList} from '../../../util/axios'
const state = {
  bannerList:[]
}

const getters = {
  getBannerList(state){
    return state.bannerList
  }
}

const mutations = {
  REQ_BANNERLIST(state,payload){
    state.bannerList = payload
  }
}

const actions = {
  getBannerListAction({commit}){
    getBannerList().then(res=>{
      commit('REQ_BANNERLIST',res.data.list)
    })
  }
}

export default {
  state,
  getters,
  mutations,
  actions,
  namespaced:true
}